package Interpreter_Pattern.Simple;



// -*-coding:utf-8 -*-
//人员：刘陆鑫
//班级：19软3
//学号；2019110218
public class Client {
    public static void main(String[] args) {
        String num="1 and 0",
                num2="1 or 0 and 1 and 0 or 0",
                num3="0 or 1 and 1 or 0";
        InstructionHandler instructionHandler=new InstructionHandler();
        instructionHandler.handle(num);
        System.out.println("等式为"+num+"\n结果"+instructionHandler.play());
        instructionHandler.handle(num2);
        System.out.println("等式为"+num2+"\n结果"+instructionHandler.play());
        instructionHandler.handle(num3);
        System.out.println("等式为"+num3+"\n结果"+instructionHandler.play());
    }
}
